1. Technical Field
The invention relates generally to an image processing method and an apparatus using the same, and more particularly to a method of motion estimation and an apparatus using the same.
2. Related Art
Generally speaking, for an image capturing apparatus such as a digital camera or a video camera, when the images directly extracted from a photosensitive device with the lenses in the image capturing apparatus all exhibit a certain degree of lens distortion, a lens distortion compensation operation is typically performed by the image capturing apparatus to compensate the lens distortion before an image output step or other image processing steps, such that the output images are acceptable to a user.
FIG. 1 is a schematic diagram illustrating a conventional imaging process for compensating lens distortion. Referring to FIG. 1, a first image IMG1 and a second image IMG2 extracted from the photosensitive device at adjacent time points are typically in the Bayer pattern format. In some image application processes, such as an image application processing 110 in FIG. 1, since the characteristics of the process is more suitable for the Bayer pattern format, the image application process is performed on the images (e.g., the first and second images IMG1 and IMG2). The image application processing step is, for example, a 3D noise reduction process. Since the pixel components directly corresponding to the noise reduction content are the RGB components in the pixels, therefore the 3D noise reduction process is more suitable for the Bayer pattern format.
Thereafter, during a basic image process 120, besides performing basic image content adjustment on the first and second images IMG1 and IMG2, the image format is also transformed from the Bayer pattern format of the first and second images IMG1 and IMG2 to a YUV pattern format. Accordingly, a first compensated image CIMG1 and a second compensated image CIMG2 can be derived by performing a lens distortion compensation process on the first image IMG1 and the second image IMG2. An image application process 140 suitable for the compensated images and the YUV format receives the first compensated image CIMG1 and the second compensated image CIMG2 for processing. Whether used before the lens distortion compensation process 130 (e.g. in the image application process 110) or in the image application process thereafter (e.g. in the image application process 140), motion estimation is one of the widely adopted techniques. The motion estimation processes 111 and 141 respectively provide the motion vector estimation content in the image application processes 110 and 140, including the local motion vectors in each block between the first image IMG1 and the second image IMG2, as well as the entire global motion vector.
In conventional techniques, the motion estimation process 141 can be derived from a data access route r1 or a data access route r2. Since the motion estimation process 141 derives the motion vector estimation content through the data access route r1, the motion estimation process 141 directly references the estimation result of the motion estimation process 111. Although this method saves on the calculation bandwidth and the power consumption, the content of each block and the corresponding location are altered before and after the lens distortion compensation process 130. Accordingly, the motion vector estimation content obtained from the motion estimation process 111 through the data access route r1 has a specific error compared to the first image IMG1 and IMG2 after the compensation process. Therefore, the actual motion vectors of the compensated images cannot be accurately reflected. From another perspective, the motion estimation process 140 may also obtain the first and second images IMG1 and IMG2 after the compensation process through the data access route r2, in order to calculate again the motion vector estimation content of the two compensated images. However, although a more accurate content can be obtained, unfavorable amounts of calculation and power are wasted in the process. Therefore, how to accurately obtain motion vector estimation results of images that have been lens distortion compensated is currently an important area in this field.